<!DOCTYPE html>
<html lang="zh">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta
            name="viewport"
            content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui"
        />
        <meta name="keywords" content="申请查询" />
        <meta name="description" content="申请查询" />
        <title>参数设置</title>
        <link rel="shortcut icon" type="image/x-icon" href="../favicon.ico" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="apple-touch-fullscreen" content="yes" />
        <meta name="apple-mobile-web-app-status-bar-style" content="default" />
        <link
            rel="stylesheet"
            type="text/css"
            href="../css/materialdesignicons.min.css"
        />
        <link
            rel="stylesheet"
            type="text/css"
            href="../css/bootstrap.min.css"
        />
        <!-- 引入 bootstrap-table 样式 -->
        <link rel="stylesheet" type="text/css" href="../css/style.min.css" />
        <link rel="stylesheet" type="text/css" href="../css/setting.css" />
    </head>

    <body>
        <div class="container-fluid p-15">
            <div class="box_setting">
                <!-- 查询条件 -->

                <div class="box_left">
                    <div class="title_left">参数设置</div>
                    <div
                        class="nav flex-column nav-pills"
                        aria-orientation="vertical"
                    >
                        <a
                            class="nav-link active"
                            data-toggle="pill"
                            href="#first"
                            aria-selected="true"
                            >管理参数设置</a
                        >
                        <a
                            class="nav-link"
                            data-toggle="pill"
                            href="#second"
                            aria-selected="false"
                            >报表内容设置</a
                        >
                        <a
                            class="nav-link"
                            data-toggle="pill"
                            href="#third"
                            aria-selected="false"
                            >图片相关设置</a
                        >
                        <a
                            class="nav-link"
                            data-toggle="pill"
                            href="#fourth"
                            aria-selected="false"
                            >视频核验参数设置</a
                        >
                        <a
                            class="nav-link"
                            data-toggle="pill"
                            href="#otherSet"
                            aria-selected="false"
                            >其他参数设置</a
                        >
                    </div>
                </div>

                <div class="box_right">
                    <div class="tab-content tab-box" id="v-pills-tabContent">
                        <div id="first" class="tab-pane fade show active">
                            <div class="title_box">
                                <div class="title_label">管理参数设置</div>
                            </div>
                            <!-- <div class="flex_Setbox"> -->
                            <div class="flex_Setbox_1">
                                <div class="flex_Setbox">
                                    <div class="flex_Setbox_left">
                                        管理用户权限：
                                    </div>
                                    <div class="flex_Setbox_right">
                                        <div
                                            class="custom-control custom-radio custom-control-inline"
                                        >
                                            <input
                                                type="radio"
                                                id="customRadioInline1"
                                                name="customRadioInline"
                                                class="custom-control-input"
                                                checked
                                            />
                                            <label
                                                class="custom-control-label custom-control-label-H"
                                                for="customRadioInline1"
                                                >本级及下级所有</label
                                            >
                                        </div>
                                        <div
                                            class="custom-control custom-radio custom-control-inline"
                                        >
                                            <input
                                                type="radio"
                                                id="customRadioInline2"
                                                name="customRadioInline"
                                                class="custom-control-input"
                                            />
                                            <label
                                                class="custom-control-label custom-control-label-H"
                                                for="customRadioInline2"
                                                >本级</label
                                            >
                                        </div>
                                        <div
                                            class="custom-control custom-radio custom-control-inline"
                                        >
                                            <input
                                                type="radio"
                                                id="customRadioInline3"
                                                name="customRadioInline"
                                                class="custom-control-input"
                                            />
                                            <label
                                                class="custom-control-label custom-control-label-H"
                                                for="customRadioInline3"
                                                >下级</label
                                            >
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="flex_Setbox_1">
                                <div class="flex_Setbox">
                                    <div class="flex_Setbox_left">
                                        是否启用乡镇用户：
                                    </div>
                                    <div class="flex_Setbox_right">
                                        <div
                                            class="custom-control custom-radio custom-control-inline"
                                        >
                                            <input
                                                type="radio"
                                                id="isVillages"
                                                name="isVillages"
                                                class="custom-control-input"
                                                checked
                                            />
                                            <label
                                                class="custom-control-label custom-control-label-H"
                                                for="isVillages"
                                                >是</label
                                            >
                                        </div>
                                        <div
                                            class="custom-control custom-radio custom-control-inline"
                                        >
                                            <input
                                                type="radio"
                                                id="isVillages2"
                                                name="isVillages"
                                                class="custom-control-input"
                                            />
                                            <label
                                                class="custom-control-label custom-control-label-H"
                                                for="isVillages2"
                                                >否</label
                                            >
                                        </div>
                                        <div class="flex_Setbox_right_tip">
                                            <div class="Setbox_right_content">
                                                <span
                                                    class="Setbox_right_tip_margin"
                                                >
                                                    启用乡镇用户后，申请表编号以乡镇区域码为准生成
                                                </span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="flex_Setbox_1">
                                <div class="flex_Setbox">
                                    <div class="flex_Setbox_left">
                                        单机中央补贴额/销售单价比例：
                                    </div>
                                    <div class="flex_Setbox_right">
                                        <div class="flex_Setbox_right_tip">
                                            <div class="Setbox_right_content">
                                                <input
                                                    type="text"
                                                    class="form-control form-control-w"
                                                    id="unitSetSubsidy"
                                                    placeholder=""
                                                />
                                                <span
                                                    class="Setbox_right_tip_margin"
                                                >
                                                    %
                                                    设置比例的范围是大于等于30%并且小于100%(系统保留2位小数)
                                                </span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="flex_Setbox_1">
                                <div class="flex_Setbox">
                                    <div class="flex_Setbox_left">
                                        是否启用三合一机具最低作业面积要求：
                                    </div>
                                    <div class="flex_Setbox_right">
                                        <div
                                            class="custom-control custom-radio custom-control-inline"
                                        >
                                            <input
                                                type="radio"
                                                id="three-in-one-is"
                                                name="three-in-one-is"
                                                class="custom-control-input"
                                                checked
                                            />
                                            <label
                                                class="custom-control-label custom-control-label-H"
                                                for="three-in-one-is"
                                                >是</label
                                            >
                                        </div>
                                        <div class="flex_Setbox_right_tip">
                                            <div class="Setbox_right_content">
                                                <input
                                                    type="text"
                                                    class="form-control form-control-w"
                                                    id="threeInOneoperation"
                                                    placeholder=""
                                                />
                                                <span
                                                    class="Setbox_right_tip_margin"
                                                    >满足最低作业要求亩数,正整数</span
                                                >
                                            </div>
                                        </div>
                                        <div
                                            class="custom-control custom-radio custom-control-inline"
                                        >
                                            <input
                                                type="radio"
                                                id="three-in-one"
                                                name="three-in-one-is"
                                                class="custom-control-input"
                                            />
                                            <label
                                                class="custom-control-label custom-control-label-H"
                                                for="three-in-one"
                                                >否</label
                                            >
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="flex_Setbox_1">
                                <div class="flex_Setbox">
                                    <div class="flex_Setbox_left">
                                        公式期天数：
                                    </div>
                                    <div class="flex_Setbox_right">
                                        <div class="Setbox_right_content">
                                            <input
                                                type="text"
                                                class="form-control form-control-w"
                                                id="unitSetSubsidy"
                                                placeholder=""
                                            />
                                            <span
                                                class="Setbox_right_tip_margin"
                                            >
                                                天 公式期为7个自然日，不可修改
                                            </span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="flex_Setbox_1">
                                <div class="flex_Setbox">
                                    <div class="flex_Setbox_left">
                                        购机总价为中央财政补贴的最高倍数：
                                    </div>
                                    <div class="flex_Setbox_right">
                                        <div class="Setbox_right_content">
                                            <input
                                                type="text"
                                                class="form-control form-control-w"
                                                id="unitSetSubsidy"
                                                placeholder=""
                                            />
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="flex_Setbox_1">
                                <div class="flex_Setbox">
                                    <div class="flex_Setbox_left">
                                        生产企业可完善经销商数量：
                                    </div>
                                    <div class="flex_Setbox_right">
                                        <div class="Setbox_right_content">
                                            <input
                                                type="text"
                                                class="form-control form-control-w"
                                                id="unitSetSubsidy"
                                                placeholder=""
                                            />
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="flex_Setbox_1">
                                <div class="flex_Setbox">
                                    <div class="flex_Setbox_left">
                                        是否启用三合一机具最低作业面积要求：
                                    </div>
                                    <div class="flex_Setbox_right">
                                        <div
                                            class="custom-control custom-radio custom-control-inline"
                                        >
                                            <input
                                                type="radio"
                                                id="minimum"
                                                name="minimumName"
                                                class="custom-control-input"
                                                checked
                                            />
                                            <label
                                                class="custom-control-label custom-control-label-H"
                                                for="minimum"
                                                >根据档次设置</label
                                            >
                                        </div>
                                        <div
                                            class="custom-control custom-radio custom-control-inline"
                                        >
                                            <input
                                                type="radio"
                                                id="minimum2"
                                                name="minimumName"
                                                class="custom-control-input"
                                            />
                                            <label
                                                class="custom-control-label custom-control-label-H"
                                                for="minimum2"
                                                >根据中央补贴额设置(元)</label
                                            >
                                        </div>
                                        <div class="flex_Setbox_right_tip">
                                            <div class="Setbox_right_content">
                                                <input
                                                    type="text"
                                                    class="form-control form-control-w"
                                                    id="unitSetSubsidy"
                                                    placeholder=""
                                                />
                                                <span
                                                    class="Setbox_right_tip_margin"
                                                >
                                                    小于等于该设置额度为非重点机具
                                                </span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="flex_Setbox_1 no-border">
                                <div class="flex_Setbox">
                                    <div class="flex_Setbox_left">
                                        全程办理天数：
                                    </div>
                                    <div class="flex_Setbox_right">
                                        <div class="Setbox_right_content">
                                            <input
                                                type="text"
                                                class="form-control form-control-w"
                                                id="unitSetSubsidy"
                                                placeholder=""
                                            />
                                            <span> </span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="flex_Setbox_1 no-border">
                                <div class="flex_Setbox">
                                    <div class="flex_Setbox_left">
                                        农机部门办理天数：
                                    </div>
                                    <div class="flex_Setbox_right">
                                        <div class="Setbox_right_content">
                                            <input
                                                type="text"
                                                class="form-control form-control-w"
                                                id="unitSetSubsidy"
                                                placeholder=""
                                            />
                                            <span
                                                class="Setbox_right_tip_margin"
                                            >
                                                自然日，不能超过28天且不能小于公式天数
                                            </span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="flex_Setbox_1 no-border">
                                <div class="flex_Setbox">
                                    <div class="flex_Setbox_left">
                                        财政部门办理天数：
                                    </div>
                                    <div class="flex_Setbox_right">
                                        <div class="Setbox_right_content">
                                            <input
                                                type="text"
                                                class="form-control form-control-w"
                                                id="unitSetSubsidy"
                                                placeholder=""
                                            />
                                            <span
                                                class="Setbox_right_tip_margin"
                                            >
                                                自然日，不能超过21天
                                            </span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="flex_Setbox_1 no-border">
                                <div class="flex_Setbox">
                                    <div class="flex_Setbox_left">
                                        限时办理预警天数：
                                    </div>
                                    <div class="flex_Setbox_right">
                                        <div class="Setbox_right_content">
                                            <input
                                                type="text"
                                                class="form-control form-control-w"
                                                id="unitSetSubsidy"
                                                placeholder=""
                                            />
                                            <span
                                                class="Setbox_right_tip_margin"
                                            >
                                                自然日
                                            </span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="flex_Setbox_1">
                                <div class="flex_Setbox">
                                    <div class="flex_Setbox_left">
                                        上传企业承诺书模板（供生产企业下载）：
                                    </div>
                                    <div class="flex_Setbox_right flex_status">
                                        <div class="fileName flex_status"></div>
                                        <div
                                            class="btn upload btn-outline-primary"
                                        >
                                            <span class="upload-text"
                                                >点击上传</span
                                            >
                                            <input
                                                single
                                                type="file"
                                                class=""
                                                accept=".jpg,.jpeg,image/jpg,image/jpeg"
                                                name="file"
                                                id="commitment"
                                                onchange="uploadImage(this)"
                                            />
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="save_box">
                                <button class="btn btn-success">保存</button>
                            </div>
                            <!-- </div> -->
                            <!-- <h1>Choose your gift</h1> -->
                        </div>
                        <div id="second" class="tab-pane fade" role="tabpanel">
                            <h1>报表内容设置</h1>
                        </div>
                        <div id="third" class="tab-pane fade">
                            <h1>图片相关设置</h1>
                        </div>
                        <div id="fourth" class="tab-pane fade">
                            <h1>视频核验参数设置</h1>
                        </div>
                        <div id="otherSet" class="tab-pane fade">
                            <h1>其他参数设置</h1>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <script type="text/javascript" src="../js/jquery.min.js"></script>
        <script type="text/javascript" src="../js/bootstrap.min.js"></script>
        <script type="text/javascript" src="../js/main.min.js"></script>
        <script type="text/javascript" src="../utils/preview.js"></script>
        <script type="text/javascript" src="../utils/uploadimg.js"></script>
        <script>
            // $('#commitment').change(function (e) {
            //     console.log(e)
            //     uploadImage(e)
            //     //获取文件的value值
            //     file = $('#commitment').val()
            //     //获取文件名+扩展名
            //     fileName = file.split('\\').pop()
            //     //获取文件名
            //     fileName = fileName.substring(0, fileName.lastIndexOf('.'))
            //     //获取文件的扩展名
            //     fileExt = file.substr(file.lastIndexOf('.'))
            //     //清空DIV容器内容
            //     $('#div').html('')
            //     $('.fileName').append('<p>' + fileName + fileExt + '</p>')
            // })

            /** 图片上传 */
            function uploadImage(e) {
                //获取文件的value值
                file = $('#commitment').val()
                //获取文件名+扩展名
                fileName = file.split('\\').pop()
                //获取文件名
                fileName = fileName.substring(0, fileName.lastIndexOf('.'))
                //获取文件的扩展名
                fileExt = file.substr(file.lastIndexOf('.'))
                //清空DIV容器内容
                $('#div').html('')

                /** 上传的图片 */
                var imgs = []
                var fileList = e.files
                for (var i = 0; i < fileList.length; i++) {
                    imgs.push(fileList[i])
                }

                if (fileList) {
                    ;[].forEach.call(fileList, readAndPreview)
                }

                if (!fileList.length) {
                    $.message({
                        type: 'error',
                        message: '请选择图片'
                    })
                    return
                }

                /** 渲染图片 */
                function readAndPreview(file) {
                    // 确保 `file.name` 符合我们要求的扩展名
                    if (/\.(jpe?g)$/i.test(file.name)) {
                        //这里是读取到input返回出来的fileList中文件
                        var reader = new FileReader()

                        reader.addEventListener(
                            'load',
                            function () {
                                var result = this.result
                                var $p = document.createElement('p')
                                $p.class = 'preImg'
                                $($p).attr('src-data', result)
                                $p.innerText = fileName + fileExt
                                $p.onclick = function () {
                                    imagePreview($(this).attr('src-data'))
                                }
                                $('.fileName').append($p)

                                $('.preImg').click(function () {})
                            },
                            false
                        )

                        //调用readAsDataURL()方法拿到result
                        reader.readAsDataURL(file)
                    } else {
                        $.message({
                            type: 'error',
                            message: '请选择正确格式的图片'
                        })
                    }
                }
            }
        </script>
    </body>
</html>
